All Questions
23 questions
1vote
2answers
278views
OOP Design of a Mathematical Group
A Group is formally defined as a set of Element's, over which a single operator mul is defined. There are different kinds of Groups, and each kind requires a different set of parameters. Operator mul ...
2votes
1answer
7kviews
Low-level Design of a Bike Rental Service
I'm working on the low-level design of a bike rental service and I was wondering if the solution is good or where it can be improved. Context & Requirements I used an exercise I found online which ...
-1votes
2answers
176views
Robins magic Chess game: Where to put/split the behaviour to full fill Law of Demeter [closed]
So now i have a really concrete example; its highly related to that question here: Tell one, but ask the others? the important statements there are: In the comment section https://softwareengineering....
-1votes
1answer
115views
Different composition techniques from the perspective of the client
There exists different composition arts/techniques, i will present in the following some of them. The question then is do you know more techniques additional to my presented ones? And then the ...
-2votes
1answer
146views
Deep Object Graph Hierarchy: access an object which belongs to that hierarchy
Consider we have something like this: A person, which has a physical body with arms, each arm has a hand, each hand fingers, and each finger a fingernail. Another example: we have a car and a car-...
0votes
3answers
486views
Tell one, but ask the others?
Consider we have three classes which want to collaborate, then, where is the behaviour? I guess it can only be in one of the three classes or in a fourth one acting than as a procuedural connector-...
3votes
3answers
1kviews
Is it a good idea to extend a class if it doesn't add new behaviour?
I'm working on a RPG so my character can equip a Weapon, Hat, Boots, Gloves, etc. So I have an Item class for the different items and the only class who adds new Behaviour is weapon. I'm not sure if ...
1vote
4answers
181views
How to deal with huge enums that internalize a lot of different contexts without instead creating brittle mapping code in said contexts?
Let's assume that I have an attribute called Ticket_Case that has a predefined value (for the sake of arguments, say 1 to 20) that model different real-life use cases. They are an attribute to an ...
2votes
3answers
110views
Finding object responsibilities while designing a book reader
The biggest difficulty I am having is finding responsibilities of each object identified by me in the system or so called problem space. I am positing a very simplified description of a book reader. ...
4votes
2answers
4kviews
Are service objects necessary in OOP?
I have been using AngularJs since a long time. Me and my team makes heavy use of services for retrieving the remote resources like Users which intern uses $http service so, basically, for each entity, ...
6votes
4answers
8kviews
What is a software architecture and how to represent it?
I've searched a lot for a clear explanation for a software architecture but each time I got more confused, so What a software architecture really is and is there a standard way to represent it or it's ...
0votes
3answers
131views
Modelling objects relationship
I am trying to understand a general pattern. Suppose I have an application where I show User and all the Jobs listings where he has applied, here User and Job are many2many relationship. In the same ...
2votes
3answers
465views
OOP: Concerns about extensible design based on Interfaces
Introduction to my problem I'm trying to design a very simple video game where there are several Animals players (they all inherit from Animal): Cat Dog Rabbit There are also some performable actions ...
7votes
5answers
4kviews
OOP: Passing new Object as a parameter or creating it inside constructor?
I have three subclasses that inherit from Hero: Warrior Magician Amazon The three of them hold a Weapon, that is always the same one: Warrior always holds a Sword (that inherits from Weapon) Magician ...
2votes
1answer
360views
Designing interactions in Object Oriented Design
I am creating an object oriented design for a cab-calling app like Uber. I have some of the classes listed. I am having trouble in designing behavior between the classes. For example, I have these two ...